#!/bin/sh
# purge anything unused during installation

rm -rf /usr/include
rm -rf /usr/share/icons/{hicolor,large,mini}

# PAM plugins
rm -rf /lib*/security

rm -rf /usr/share/ca-certificates
rm -rf /usr/lib/qt4/plugins/codecs
rm -rf /usr/lib/qt4/plugins/bearer
rm -rf /usr/lib/qt4/plugins/inputmethods
rm -rf /usr/share/qt4/{doc,mkspecs,phrasebooks}
rm -rf /usr/lib*/qt5/plugins/{bearer,platformthemes}

rm -rf /usr/share/guile/*/{*.txt,scripts}
rm -rf /usr/share/awk/

# and no systemd either
[ -L /sbin/init ] || rm -rf /lib/systemd/system

# save VNC install if present
MORE=
[ -x /usr/bin/x11vnc ] || MORE="xterm"

### could it be handled with any grace?
rpmquery -a common-licenses \
	cpp\* gcc\* perl-base file ipv6calc \
	bind-utils \
	$MORE glxinfo xdriinfo \
	xdg-utils \
	mkfontscale mkfontdir \
	make make-initrd \
| xargs -r rpmi -e --nodeps --

rpmquery -a libisl\* libcloog-isl\* \
| xargs -r rpmi -e --

:
